//
// Created by 抑~风 on 2022/12/20.
//

#ifndef BPLUSDATABASE_TIMEUTIL_H
#define BPLUSDATABASE_TIMEUTIL_H
#include <ctime>
#include <sstream>
#include <chrono>
#include <cstring>
#include <iostream>

using namespace std;
namespace CWJ::TIME {
// time转格式化字符串=====================================

    std::string ShowDateTime(const tm &t, const string &format);


    std::string ShowDateTime(const time_t &t, const string &format) ;

    std::string ShowDateTime(const tm &t, const char &dateDiv = '-', const char &timeDiv = ':') ;

    std::string ShowDateTime(const time_t &t, const char &dateDiv = '-', const char &timeDiv = ':') ;

    std::string ShowYMD(const time_t &t, const char &dateDiv = '-') ;

    std::string ShowHMS(const time_t &t, const char &timeDiv = ':') ;

    std::string ShowHM(const time_t &t, const char &timeDiv = ':') ;
}

#endif //BPLUSDATABASE_TIMEUTIL_H
